home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8958 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.0 KB

  1. Path: faatcrl.faa.gov!usenet
  2. From: ron thompson <thompsor@admin.tc.faa.gov>
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Date: 27 Feb 1996 16:36:37 GMT
  6. Organization: aos-420
  7. Message-ID: <4gvbulINN1kb@faatcrl.faa.gov>
  8. References: <00001a73+00002504@msn.com> <4etcmm$lpd@nova.dimensional.com>       <312515DF.7D3B@cmlj.demon.co.uk> <4gad29$ddp@druid.borland.com>         <4 <dirk.824894312@demokrit> <4geuge$n56@qualcomm.com> <4gspbo$rjm@gaia.ns.utk.edu> <dewar.825427437@schonberg>
  9. NNTP-Posting-Host: 155.178.52.24
  10. X-Mailer: Mozilla 1.2 (Windows; U; 32bit)
  11. MIME-Version: 1.0
  12. Content-Transfer-Encoding: 7bit
  13. Content-Type: text/plain; charset=us-ascii
  14.  
  15. dewar@cs.nyu.edu (Robert Dewar) wrote:
  16. >Nasser asks
  17. >
  18. >": This is the essence of the Ada culture: top-down control where
  19. >: programmers are subordinates of the lead architects and managers.
  20. >
  21. >: Other languages -- specifically C++ -- focus on simplifying the
  22. >: programming activities while sacrificing some of the ease of control.
  23. >
  24. >Would somebody from Rational care to explain what aspects of C++ they believe
  25. >simplify the programming activity compared to Ada?"
  26. >
  27. >I am not from Rational :-)
  28. >
  29. >but here is my answer anyway, just one example.
  30. >
  31. >If a programmer wants to do a weird unchecked conversion, in C++ you just
  32. >go ahead and write a cast and that's the end of it.
  33. >
  34. >In Ada, you have to make a big production of things, with unchecked_Conversoin,
  35. >instantiated it, and then use it.
  36. >
  37. >Not only is this more work, but you might find some pesky rule saying that
  38. >only certain units in the program are permitted to with Unchecked_Conversion
  39. >(an example of top down control).
  40.  
  41. Exactly. In our world, we consider that "big production of
  42. things" to be the tip off to the savvy reader/maintainer
  43. that SOMEthing is going to happen here that may or may
  44. not explicitly meet the eye. It is our experience that readers
  45. tend to glide the parenthesis, saving them for later study
  46. should they feel a need to. Cast via parenthetical indication
  47. is often overlooked until about the nth time through it.
  48.  
  49. We like that glaring
  50. "... is new unchecked conversion(Something, Something_Else);"
  51.  
  52. The conversion is then an actual call to a hopefully 
  53. descriptive name that is just a tad harder to overlook then a 
  54. call with a series of parenthetical notes as to what is being
  55. done.
  56.  
  57. We also find that a good spot for commenting is just prior
  58. to a function/procedure call, so the habit of commenting is
  59. applied to the upcoming cast. It is easy to comment the next
  60. call yet forget that we are casting on the fly.
  61.  
  62. The trade obviously is that it makes a few steps more in
  63. the process. The one I always enjoy is that it is far less
  64. typing in C/C++...
  65.  
  66. As for top-down control, well we just always remember that
  67. no matter what the architecture, OS, or language, NObody
  68. knows the job like the engineers/programmers. Sure we are 
  69. suboordinates to the top end, but hey, someone has to be. 
  70. Besides, they provide us with such a rich variety of laughs...
  71.  
  72. rct
  73.  
  74. The opinion(s) expressed above are mine and mine alone.
  75.  
  76.